/*
 * @Author: jqgao2
 * @Date: 2022-03-23 19:53:52
 * @LastEditTime: 2022-03-23 22:42:30
 * @Description: mian
 * @FilePath: \ilovecoffee\src\main.ts
 * @LastEditors: jqgao2
 */
import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.useGlobalPipes(
    new ValidationPipe({
      // 自动删除无用属性
      whitelist: true,
      // 自动转换类型
      transform: true,
      // forbidNonWhitelisted: true,
    }),
  );
  await app.listen(3000);
}
bootstrap();
